// Regionals 1995 >> North America - South Central USA
// UVa401 - Palindromes
// 刘汝佳
#include <bits/stdc++.h>
using namespace std;
string rev = "A   3  HIL JM O   2TUVWXY51SE Z  8 ",
  msg[] = {
    "not a palindrome",
    "a regular palindrome",
    "a mirrored string",
    "a mirrored palindrome"
  };

char r(char c) {
  if (isalpha(c)) return rev[c - 'A'];
  return rev[c - '0' + 25];
}

int main() {
  char s[32];
  while (scanf("%s", s) == 1) {
    int len = strlen(s), p = 1, m = 1;
    for (int i = 0; i < (len + 1) / 2; i++) {
      if (s[i] != s[len - 1 - i]) p = 0; // 不是回文串
      if (r(s[i]) != s[len - 1 - i]) m = 0; // 不是镜像串
    }
    printf("%s -- is %s.\n\n", s, msg[m * 2 + p]);
  }
  return 0;
}
/*
算法分析请参考: 《入门经典-第2版》例题3-3
注意本题中输入字符串应该使用scanf而不是gets，避免出现读入空行的问题
*/
// 2624946  5485  Palindromes Accepted  C++11 0.003 2020-01-21 13:25:57